<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
	xmlns:dt="http://github.com/dandelion/datatables"
	xmlns:sec="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<title th:utext="#{title.editproject}"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="Dhrubo" />

<!-- Le styles -->
<link rel="stylesheet" type="text/css" media="all"
	href="css/bootstrap.css" th:href="@{/resources/css/bootstrap.css}" />
<style type="text/css">
body {
	padding-top: 60px;
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
<link rel="stylesheet" type="text/css" media="all"
	href="css/bootstrap-responsive.css"
	th:href="@{/resources/css/bootstrap-responsive.css}" />

<link rel="stylesheet" type="text/css" media="all"
	href="css/DT_bootstrap.css"
	th:href="@{/resources/css/DT_bootstrap.css}" />



</head>

<body>

	<div th:substituteby="fragments/userheader :: navbar"></div>

	<div class="container-fluid">

		<div class="row-fluid">
			<div class="span6">
				<ul class="breadcrumb">
					<li><a href="home" th:utext="#{home}"></a> <span
						class="divider">/</span></li>
					<li><a href="listprojects" th:utext="#{listprojects}"></a> <span
						class="divider">/</span></li>
					<li class="active" th:utext="#{editproject}"></li>
				</ul>
			</div>
			<div class="span6">
				<div class="btn-group pull-right">
					<a class="btn btn-primary" href="newproject"
						th:utext="#{newproject}"></a>

				</div>
			</div>
		</div>

		<div class="row-fluid">

			<div class="span12">

				<form action="authentication" th:action="@{/updateproject}"
					th:with="c=${project.createdDate.toDate()}, l=${project.lastUpdatedDate.toDate()}"
					id="editprojectform" class="form-horizontal" th:object="${project}"
					method="post">


					<fieldset>
						<legend th:utext="#{editproject}"></legend>
						<div id="message"></div>


						<div class="control-group">

							<label class="control-label" for="name" th:utext="#{projectname}"></label>
							<div class="controls">
								<input type="text" th:field="*{name}"
									th:placeholder="#{projectname}" class="input-xlarge"
									required="required" />

							</div>
						</div>

						<div class="control-group">
							<label class="control-label" for="name" th:utext="#{description}"></label>
							<div class="controls">
								<textarea rows="3" cols="20" th:field="*{description}"
									class="input-xlarge" th:placeholder="#{description}"></textarea>
								<input type="hidden" th:field="*{id}" />
							</div>
						</div>
						
						<div class="control-group">

							<label class="control-label" for="name" th:utext="#{manager}"></label>
							<div class="controls">
								<a href="#" th:text="${project.manager.name}"></a> 

							</div>
						</div>

						<div class="control-group">
							<label class="control-label" for="name" th:utext="#{createdby}"></label>
							<div class="controls">
								<span th:text="*{createdBy.name}" class="label label-info">
								</span> <span th:text="${beans.pretty.format(c)}"
									class="label label-info"> </span>
							</div>
						</div>


						<div class="control-group">
							<label class="control-label" for="name"
								th:utext="#{lastupdatedby}"></label>
							<div class="controls">
								<span th:text="*{lastUpdatedBy.name}" class="label label-info"></span>
								<span th:text="${beans.pretty.format(l)}"
									class="label label-info"></span>
							</div>
						</div>

						<div class="form-actions">
							<button type="submit" class="btn btn-success" th:utext="#{save}"></button>
							<button type="reset" class="btn btn-info" th:utext="#{cancel}"></button>
						</div>

					</fieldset>
				</form>


			</div>



			<!--/span-->
		</div>


		<div class="row-fluid">

			<!--/span-->
			<div class="span12">

				<div th:substituteby="fragments/table-user :: usertable"></div>


			</div>
			<!--/span-->
		</div>
		<!--/row-->


		<div class="row-fluid">

			<!--/span-->
			<div class="span12">


				<table id="actorTbl"
					class="table table-striped table-bordered table-condensed">

					<thead>
						<tr>
							<th colspan="2"><span class="label label-info"
								th:utext="#{actors}"></span> 
								<!--
								<a
								class="btn btn-primary pull-right btn-small" href="newactor"
								th:utext="#{newactor}"></a>
								-->
								
								</th>
						</tr>
						<tr>

							<th th:utext="#{name}"></th>
							<th th:utext="#{complexity}"></th>


						</tr>
					</thead>
					<tbody>
						<tr th:each="a : ${actors}">

							<td th:text="${a.name}" />
							<td th:text="${a.complexity}" />

						</tr>
					</tbody>
				</table>


			</div>
			<!--/span-->
		</div>
		<!--/row-->



		<hr />



	</div>
	<!--/.fluid-container-->
	<div th:substituteby="fragments/userheader :: footer"></div>

	<!-- Le javascript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->


	<script src="js/jquery.js" th:src="@{/resources/js/jquery.js}"></script>
	<script src="js/jquery.dataTables.js"
		th:src="@{/resources/js/jquery.dataTables.js}"></script>

	<script src="js/bootstrap-dropdown.js"
		th:src="@{/resources/js/bootstrap-dropdown.js}"></script>

	<script src="js/bootstrap-alert.js"
		th:src="@{/resources/js/bootstrap-alert.js}"></script>

	<script src="js/DT_bootstrap.js"
		th:src="@{/resources/js/DT_bootstrap.js}"></script>

	<script src="js/editproject.js"
		th:src="@{/resources/js/editproject.js}"></script>

</body>
</html>
